//
//  FilmListTableViewCell.m
//  豆瓣
//
//  Created by dllo on 15/11/23.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "FilmListTableViewCell.h"

@implementation FilmListTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self createCell];
    }
    
    return self;
}

- (void)createCell {
    
    
   /********************************** 自定义cell *************************************/
    
    
    // 蓝色背景图
    UIImageView *backgroungImageV = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, [UIScreen mainScreen].bounds.size.width - 20, 140)];
    backgroungImageV.image = [UIImage imageNamed:@"bg_eventlistcell.png"];
    [self addSubview:backgroungImageV];
    [backgroungImageV release];
    
    // 简介图片
    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(8, 8, 90, 124)];
    [backgroungImageV addSubview:self.imageV];
    [self.imageV release];
    
    // 电影名
    self.nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.imageV.frame.origin.x + self.imageV.frame.size.width + 20, (self.imageV.frame.size.height - 50) / 2 + 17, 300, 50)];
    self.nameLabel.font = [UIFont systemFontOfSize:21];
    self.nameLabel.lineBreakMode = NSLineBreakByWordWrapping;
    self.nameLabel.numberOfLines = 0;
    [self addSubview:self.nameLabel];
    [self.nameLabel release];
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
